<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 	xmlns="http://www.w3.org/1999/xhtml" 
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:p="http://primefaces.prime.com.tr/ui" 
		xmlns:h="http://java.sun.com/jsf/html">
 
<h:head>
<title>JSF Demo</title>
<style type="text/css">
body,label,.ui-widget,.ui-menubar-item-label,.ui-menubar-item-label-hassubmenu,.ui-menubar-item-label-selected,.ui-menubar-item-label-hassubmenu-selected,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button
{
	font-family: Verdana, Arial, sans-serif;
	font-size: 11px;
}
</style>
<h:outputScript name="jquery/jquery.js" library="primefaces" />
<link type="text/css" rel="stylesheet" href="css/skins/aristo/skin.css" />
<script type="text/javascript">
var deger;
function test(){
	
	deger="EMRAH SEREN";
	alert(document.getElementById('myform:foo').value);
	document.getElementById('myform:test1').value = deger ;
	//document.forms[0].elements['yyy'].value="test";
}

</script>
</h:head>
<h:body>
	<p:panel header="Deneme">
		<h:form id="myform">
			<h:inputText value="#{userBean.name}" />
			<p:commandButton value="Gönder" onclick="test();"/>
			<h:outputText id="foo" value="deneme"/>
			<h:inputText id="test1" value="#{userBean.name}" />
		</h:form>
		
	</p:panel>
	<button id="hidr">Hide</button>
	<div id="scrollDiv" style="border-width: 3px;border-color:black;border-style:solid">
		<ui:repeat value="#{userBean.stockList}" var="stock">
	                 <li style="list-style: none;display: block;"> 
	                      <span><a href="#">#{stock.stockName}</a></span>
	                      
	                 </li> 
	    </ui:repeat>
    </div>


      <p style="display: none">Hello  2</p>
<script>
$(document).ready(function(){
    $("#hidr").click(function () {
        alert("test");
    	$("#scrollDiv").hide("slow");
    });
});
    </script>
</h:body>
</html>